#pragma once

#include <vector>
#include <fstream>
#include <iostream>
#include <string>
#include "Sprite.h"
#include "SDL.h"
#include "SDL_image.h"

struct infoMap
{
	int x;
	int y;
	int width;
	int height;
	int colum;
	int row;
};


class Map
{
public:
	
	Map(SDL_Renderer* pRenderer);
	virtual ~Map();

	void loadFile(char* _fileName);
	void update();
	void render();

	int findIdTitles(int &_x, int &_y);

	int getNumberTitles()
	{
		return (m_infoTitles.colum * m_infoTitles.row);
	}
	infoMap getTitles()
	{
		return m_infoTitles;
	}

	int* getLocationTitles()
	{
		return m_locationTitles;
	}

	std::string getFileName()
	{
		return m_fileName;
	}

	void setLocationTitles(int ,int)
	{
		
	}

protected:
private:

	std::string m_fileName;
	infoMap m_infoTitles;
	int* m_locationTitles;

	SDL_Renderer* m_pRenderer;
	int m_number_titles;
	Sprite m_sprite_map;
	//
	char m_recycle;
};